package au.chao.utils;

import java.util.regex.*;

public class Validator {

	/**
	 * @param args
	 */
	public static boolean validDate(String dt){
		
		Pattern  p = Pattern.compile("[0-2]{0,1}[0-9]/[0-1]{0,1}[0-9]/200[7-9]");
		Matcher m = p.matcher(dt);
		return m.matches();
		
	}
	
	public static boolean validNumber(String dt){
		
		Pattern  p = Pattern.compile("^[0-9]{1,3}\\.?[0-9]{0,3}$");
		Matcher m = p.matcher(dt);
		return m.matches();
		
	}
	
	public static void main(String[] argv){
		
	}

}
